import request from '@/utils/request'

// 查询用户提现申请列表
export function listUserPayoutDetail(query) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail/list',
    method: 'get',
    params: query
  })
}

// 查询用户提现申请详细
export function getUserPayoutDetail(id) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail/' + id,
    method: 'get'
  })
}

// 新增用户提现申请
export function addUserPayoutDetail(data) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail',
    method: 'post',
    data: data
  })
}

// 用户同意提现申请
export function userAgreePayout(data) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail/userAgreePayout',
    method: 'post',
    data: data
  })
}
// 用户拒绝提现申请
export function userRefusePayout(data) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail/userRefusePayout',
    method: 'post',
    data: data
  })
}

// 客户拒绝提现申请
export function technicianRefusePayout(data) {
  return request({
    url: '/technicianPayoutDetail/technicianPayoutDetail/technicianRefusePayout',
    method: 'post',
    data: data
  })
}

export function technicianAgreePayout(data) {
  return request({
    url: '/technicianPayoutDetail/technicianPayoutDetail/technicianAgreePayout',
    method: 'post',
    data: data
  })
}
// 业务员拒绝提现申请
export function salesmanRefusePayout(data) {
  return request({
    url: '/salesmanPayoutDetail/salesmanPayoutDetail/salesmanRefusePayout',
    method: 'post',
    data: data
  })
}
// 业务员同意提现申请
export function salesmanAgreePayout(data) {
  return request({
    url: '/salesmanPayoutDetail/salesmanPayoutDetail/salesmanAgreePayout',
    method: 'post',
    data: data
  })
}
// 渠道商拒绝提现申请
export function channelRefusePayout(data) {
  return request({
    url: '/channelPayoutDetail/channelPayoutDetail/channelRefusePayout',
    method: 'post',
    data: data
  })
}
// 渠道商同意提现申请
export function channelAgreePayout(data) {
  return request({
    url: '/channelPayoutDetail/channelPayoutDetail/channelAgreePayout',
    method: 'post',
    data: data
  })
}
// 经纪人拒绝提现申请
export function brokerRefusePayout(data) {
  return request({
    url: '/brokerPayoutDetail/brokerPayoutDetail/brokerRefusePayout',
    method: 'post',
    data: data
  })
}
// 经纪人同意提现申请
export function brokerAgreePayout(data) {
  return request({
    url: '/brokerPayoutDetail/brokerPayoutDetail/brokerAgreePayout',
    method: 'post',
    data: data
  })
}

// 修改用户提现申请
export function updateUserPayoutDetail(data) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail',
    method: 'put',
    data: data
  })
}

// 删除用户提现申请
export function delUserPayoutDetail(id) {
  return request({
    url: '/userPayoutDetail/userPayoutDetail/' + id,
    method: 'delete'
  })
}
